package com.penglecode.netty.server;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class ObjectMethodMetadata {

	private Class<?> interfaceClass;
	
	private String methodName;
	
	private Map<String, Method> methods = new HashMap<String, Method>();

	public Class<?> getInterfaceClass() {
		return interfaceClass;
	}

	public void setInterfaceClass(Class<?> interfaceClass) {
		this.interfaceClass = interfaceClass;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public void addMethod(String fullMethodName, Method method){
		synchronized(this){
			methods.put(fullMethodName, method);
		}
	}
	
	public Method getMethod(String fullMethodName){
		return methods.get(fullMethodName);
	}

}
